package com.rboat.exam.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.exam.mapper.ExamTestPaperChapterMapper;
import com.rboat.exam.domain.ExamTestPaperChapter;
import com.rboat.exam.service.IExamTestPaperChapterService;
import com.rboat.common.core.text.Convert;

/**
 * 考试试卷章节Service业务层处理
 * 
 * @author rboat
 * @date 2019-09-02
 */
@Service
public class ExamTestPaperChapterServiceImpl implements IExamTestPaperChapterService 
{
    @Autowired
    private ExamTestPaperChapterMapper examTestPaperChapterMapper;

    /**
     * 查询考试试卷章节
     * 
     * @param id 考试试卷章节ID
     * @return 考试试卷章节
     */
    @Override
    public ExamTestPaperChapter selectExamTestPaperChapterById(String id)
    {
        return examTestPaperChapterMapper.selectExamTestPaperChapterById(id);
    }

    /**
     * 查询考试试卷章节列表
     * 
     * @param examTestPaperChapter 考试试卷章节
     * @return 考试试卷章节
     */
    @Override
    public List<ExamTestPaperChapter> selectExamTestPaperChapterList(ExamTestPaperChapter examTestPaperChapter)
    {
        return examTestPaperChapterMapper.selectExamTestPaperChapterList(examTestPaperChapter);
    }

    /**
     * 新增考试试卷章节
     * 
     * @param examTestPaperChapter 考试试卷章节
     * @return 结果
     */
    @Override
    public int insertExamTestPaperChapter(ExamTestPaperChapter examTestPaperChapter)
    {
        return examTestPaperChapterMapper.insertExamTestPaperChapter(examTestPaperChapter);
    }

    /**
     * 修改考试试卷章节
     * 
     * @param examTestPaperChapter 考试试卷章节
     * @return 结果
     */
    @Override
    public int updateExamTestPaperChapter(ExamTestPaperChapter examTestPaperChapter)
    {
        return examTestPaperChapterMapper.updateExamTestPaperChapter(examTestPaperChapter);
    }

    /**
     * 删除考试试卷章节对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteExamTestPaperChapterByIds(String ids)
    {
        return examTestPaperChapterMapper.deleteExamTestPaperChapterByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除考试试卷章节信息
     * 
     * @param id 考试试卷章节ID
     * @return 结果
     */
    @Override
    public int deleteExamTestPaperChapterById(String id)
    {
        return examTestPaperChapterMapper.deleteExamTestPaperChapterById(id);
    }
}
